﻿using CoreProject.IRepository;
using CoreProject.IService;
using CoreProject.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CoreProject.Service
{
    public class HJQ_orderService : BaseService<HjqOrder>,IHJQ_orderService
    {
        private readonly IHJQ_orderReporitory _re;

        public HJQ_orderService(IHJQ_orderReporitory re) : base(re)
        {
         _re = re;
        }

        public async Task<(List<HjqOrder> list, int count)> getpageOrder<type>(int page, int limit, bool IAs, string Username,string shopname,int ZFstate)
        {
            var dd= await _re.getpageOrder(page, limit, true, a=>a.OrderId,a=>a.User.UserName.Contains(Username)&&a.OrderStatus==ZFstate);

            return dd;  
        }
    }
}
